<template>
  <div class="home-box">
    这是首页{{id}}<br><br>
    <el-button @click="handle(1)">id: 1</el-button>
    <el-button @click="handle(2)">id: 2</el-button>
  </div>
</template>
<script>
export default {
  name: 'home',
  head: {
    meta: [
      { hid: 'description', name: 'description', content: '内容描述' },
      { hid: 'keywords', name: 'keywords', content: '内容关键词' }
    ]
  },
  data () {
    return {
      id: null
    }
  },
  methods: {
    handle(id) {
      this.id = id
      this.$router.push({ name: 'home-view', query: { id } });
    }
  },
  activated () {
    console.log('activated')
  },
  mounted () {
    console.log('mounted')
  },
}
</script>
<style lang="scss" scoped>
</style>